import request from '@/utils/request'

// 查询员工教育背景子列表
export function listEducation(query) {
  return request({
    url: '/hrm/education/list',
    method: 'get',
    params: query
  })
}

// 查询员工教育背景子详细
export function getEducation(eduId) {
  return request({
    url: '/hrm/education/' + eduId,
    method: 'get'
  })
}

// 新增员工教育背景子
export function addEducation(data) {
  return request({
    url: '/hrm/education',
    method: 'post',
    data: data
  })
}

// 修改员工教育背景子
export function updateEducation(data) {
  return request({
    url: '/hrm/education',
    method: 'put',
    data: data
  })
}

// 删除员工教育背景子
export function delEducation(eduId) {
  return request({
    url: '/hrm/education/' + eduId,
    method: 'delete'
  })
}

export function getEducationByEmpId(empId) {
  return request({
    url: '/hrm/education/listByEmpId/' + empId,
    method: 'get'
  })
}
